﻿using System.Web.Optimization;

namespace Sharp.WebBooter
{
    public class BundleConfig
    {
        // 有关绑定的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/lib").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Scripts/knockout-{version}.js",
                "~/Scripts/knockout.validation.js",
                "~/Scripts/locales/knockout.validation.zh-CN.js",
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js",
                "~/Scripts/jquery.validate.unobtrusive.bootstrap.js",
                "~/Scripts/jquery.signalR-{version}.js"
              ));
            bundles.Add(new ScriptBundle("~/bundles/pulgIn").Include(
                "~/Scripts/AdminLTE/adminlte.js",
                "~/Scripts/jquery.slimscroll.js",
                "~/Scripts/AdminLTE/plugins/pace/pace.js",
                "~/Scripts/inputmask/inputmask.js",
                "~/Scripts/dataTables.js",
                "~/Scripts/DataTables/dataTables.bootstrap.js",

                "~/Scripts/sweetalert2.js",
                "~/Scripts/locales/sweetalert2.zh-CN.js",
                "~/Scripts/zTree/jquery.ztree.all.js",
                "~/Scripts/bootstrap-datepicker.js",
                "~/Scripts/locales/bootstrap-datepicker.zh-CN.min.js",
                "~/Scripts/select2.js",
                "~/Scripts/locales/select2.zh-CN.js",
                "~/Scripts/jquery.treegrid.js",
                "~/Scripts/jquery.treegrid.bootstrap3.js",
                "~/Scripts/qrcode.js",
                "~/Scripts/JSLINQ.js",
                "~/Scripts/moment.js",
                "~/Scripts/moment-with-locales.js",
                "~/Scripts/daterangepicker.js",
                "~/Scripts/locales/daterangepicker.zh-CN.js"
                          ));
            bundles.Add(new ScriptBundle("~/bundles/pulgIn/charts").Include(
                              "~/Scripts/jquery.sparkline.js",
                              "~/Scripts/jquery-jvectormap.js",
                              "~/Scripts/jquery-jvectormap-cn.js",
                              "~/Scripts/echarts.js",
                              "~/Scripts/macarons.js"
                          ));
            bundles.Add(new ScriptBundle("~/bundles/pulgIn/fileinput").Include(
                              "~/Scripts/fileinput/plugins/canvas-to-blob.js",
                              "~/Scripts/fileinput/plugins/purify.js",
                              "~/Scripts/fileinput/fileinput.js",
                              "~/Scripts/fileinput/locales/zh.js"
                          ));
            bundles.Add(new ScriptBundle("~/bundles/pulgIn/summernote").Include(
                "~/Scripts/summernote/summernote.js",
                "~/Scripts/summernote/lang/summernote-zh-CN.js"
                                ));

            bundles.Add(new ScriptBundle("~/bundles/app")
            {
                Orderer = new AppJsBundleOrderer()
            }
            .Include("~/Scripts/PlatformSharp/*.js"));

            var css = new StyleBundle("~/css/lib");
            css.Transforms.Clear();
            css.Include("~/Content/bootstrap.css", new CssRewriteUrlTransform());
            css.Include("~/Content/animate.css");
            css.Include("~/Content/font-awesome.css", new CssRewriteUrlTransform());
            bundles.Add(css);

            css = new StyleBundle("~/css/AdminLTE");
            css.Include("~/Content/AdminLTE.css");
            css.Include("~/Content/skins/_all-skins.css", new CssRewriteUrlTransform());
            css.Include("~/Scripts/AdminLTE/plugins/pace/pace.css");
            css.Include("~/Content/sweetalert2.css");
            css.Include("~/Content/zTreeStyle/awesomeStyle/awesome.css", new CssRewriteUrlTransform());
            css.Include("~/Content/dataTables.css", new CssRewriteUrlTransform());

            css.Include("~/Content/prettify.css");
            css.Include("~/Content/jquery.treegrid.css");
            css.Include("~/Content/bootstrap-datepicker.css");
            css.Include("~/Content/bootstrap-datepicker3.css");
            css.Include("~/Content/daterangepicker.css");
            css.Include("~/Content/jquery-jvectormap.css", new CssRewriteUrlTransform());
            css.Include("~/Content/css/select2.css");
            css.Include("~/Content/alt/*.css");
            bundles.Add(css);


            css = new StyleBundle("~/css/pulgIn/summernote");
            css.Include("~/Content/summernote/summernote.css");
            bundles.Add(css);

            css = new StyleBundle("~/css/pulgIn/fileinput");
            css.Include("~/Content/fileinput.css");
            bundles.Add(css);


   
             css = new StyleBundle("~/css/pulgIn/charts");
            css.Include("~/Content/jquery-jvectormap.css", new CssRewriteUrlTransform());
            bundles.Add(css);


            Areas.Platform.BundleProfile.RegisterBundles(bundles);

            BundleTable.EnableOptimizations = false;
        }
    }
}
